#!/usr/bin/env bash

NAME="ws"
echo "=================START REDEPLOY ${NAME}================="


echo "删除 ${NAME}.zip..."
rm -rf /server/wwwroot/${NAME}.zip


echo "备份 ${NAME}..."
mv /server/wwwroot/${NAME} /server/wwwbak/${NAME}_$(date "+%Y%m%d_%H%M%S")


echo "下载 ${NAME}.zip..."
wget -P /server/wwwroot http://minio.moxm.com/app/weishop/release/${NAME}.zip

echo "解压 ${NAME}...="
unzip -o /server/wwwroot/${NAME}.zip -d /server/wwwroot/


echo "=================部署 ${NAME} 完成================="
